<script type="text/javascript"> 
function getProfile(str) {  
    var arr = str;  
	document.getElementById('name').innerHTML = arr.name;  
    document.getElementById('nick').innerHTML = arr.nick;  
	document.getElementById('email').innerHTML = arr.contact.email; 
	document.getElementById('website').innerHTML = arr.contact.website; 
}  
</script> 
<body>
<div id="name"></div>
<div id="nick"></div>
<div id="email"></div>
<div id="website"></div>
</body> 
<script type="text/javascript" src="phpTojs.php"></script>